<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: LMY
  Date: 2025/6/22
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
      <title>发表评论页面</title>
    <script>
      //动态注册表单提交事件
      window.onload = function () {
        var form = document.getElementById("form");
        form.onsubmit = function () {
          //非空校验
          if (form.username == "" || form.comment == "") {
            alert("用户名和评论内容不能为空！");
            return false;
          }
          return ture;
        }
      }
    </script>
  </head>
  <body>
  <h1>发表对阿凡达电影的评论</h1>
  过滤词:苹果,香蕉${requestScope.message}
    <form action="<%=request.getContextPath()%>/exercise/showTopic.jsp" id="form" method="post">
    用户:<input type="text" name="username"><br/>
    评论:<textarea rows="6" cols="20" name="comment"></textarea><br/>
    <input type="submit" value="发表评论">
  </form>
  </body>
</html>
